package LeetCode.leetcode206reverseList;

public class Review1 {
    public ListNode reverseList(ListNode head) {
        if (head == null) return null;
        ListNode fast = head;
        ListNode slow = null;
        ListNode next = null;
        while (fast != null){
            next = fast.next;
            fast.next = slow;
            slow = fast;
            fast = next;
        }
        return slow;
    }
}
